]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: Set expandFraction for ws thumbnails to 0 when hidden
authorJonas Dreßler <verdre@v0yd.nl>
Sun, 12 May 2024 09:51:35 +0000 (11:51 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 14 May 2024 18:24:07 +0000 (18:24 +0000)
We multiply the spacing around the workspace thumbnails with the
expandFraction so that it grows with the animation to show/hide them. We
shouldn't factor in the extra spacing to accomodate for the thumbnails in
case they're hidden though, so make sure expandFraction is set to 0 after
the thumbnails got hidden.

This fixes the spacing when a user never uses workspaces (and the workspace
thumbnails are never shown), and also the first transition from
hidden->shown for the thumbnails, which currently starts at 100% scale (ie.
pops into existence).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3278>

js/ui/overviewControls.js

index 0fc81d85c8516666449108ab03022120dbc52ccf..21084b110c31dacd39a8ea2dcb88f91105c20fa8 100644 (file)
@@ -561,7 +561,10 @@ class ControlsManager extends St.Widget {
             opacity: searchActive ? 0 : opacity,
             duration: animate ? SIDE_CONTROLS_ANIMATION_TIME : 0,
             mode: Clutter.AnimationMode.EASE_OUT_QUAD,
-            onComplete: () => (this._thumbnailsBox.visible = thumbnailsBoxVisible),
+            onComplete: () => {
+                this._thumbnailsBox.visible = thumbnailsBoxVisible;
+                this._thumbnailsBox.expandFraction = 0;
+            },
         };
 
         if (!searchActive) {